<?php

/**
 * 
 *
 * @author Anthony Straetman
 *
 */

class RestrictedController extends PlonkController {

	/**
	 * The views allowed for this module
	 * @var array
	 */
	protected $views = array(
		'restricted'
	);


	/**
	 * The actions allowed for this module
	 * @var array
	 */
	protected $actions = array(
		'blank'
	);


	/**
	 * The form errors
	 * @var array
	 */
	private $formErrors = array();
	
	public function doBlank() {
		
	}
	
	public function showRestricted() {
		// ---------- Main template stuff ---------- //
		$this->setMainTemplate();
		
		// ---------- Page template stuff ---------- //
		
		// ---------- Other stuff  ---------- //
	}
	
	private function setNavigationOptions() {
		if(PlonkSession::exists('id')) { 
			// User logged in
			$this->mainTpl->assignOption('oLogout');
		} else { 
			// User logged out
			$this->mainTpl->assignOption('oLogin');
			$this->mainTpl->assignOption('oRegister');
		}
	}
	
	private function setMainTemplate() {
		$this->mainTpl->assign('pageTitle', 'Home');
		$this->mainTpl->assign('pageMeta', '<link rel="stylesheet" href="modules/home/css/home.css" />' );
		
		$this->setNavigationOptions();
	}

}

// EOF